package com.wanxi.test;

//找出水仙花数
public class NumberOfDaffodils {
    public static void main(String[] args) {

        int num = 0;
        for (int i = 100; i < 1000; i++) {

            int ge = i % 10;
            int shi = i / 10 % 10;
            int bai = i / 100 % 10;
            if (ge * ge * ge + shi * shi * shi + bai * bai * bai == i) {
                System.out.println(i);
                num++;


            }

        }
        System.out.println("水仙花数个数为： " + num);

    }


}
